// -----------------------------
// Author: 		Dhaenens Gert	
// Creation: 	2/12/2015 9:20:50 PM				
// -----------------------------

/* Win32 Headers */
#define WIN32_LEAN_AND_MEAN
#include <Windows.h>
#include <tchar.h>

/* CRT Debug */
#ifdef _DEBUG
#	include <crtdbg.h>
#	define _CRTENABLE			_CrtSetDbgFlag(_CRTDBG_LEAK_CHECK_DF | _CRTDBG_ALLOC_MEM_DF)
#	define _CRTBREAKALLOC(x)	_CrtSetBreakAlloc(x)
#else
#	define _CRTENABLE
#	define _CRTBREAKALLOC(x)
#endif

/* Flow Engine */
#include "..\Source\FlowEngine.h"
#include "..\Source\Game.h"

/* Win32 Entry Point */
int WINAPI _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, TCHAR* lpCmdLine, int iCmdShow)
{
	_CRTENABLE;
	//_CRTBREAKALLOC(391);

	// Load the Engine
	if (!Flow::Engine::Initialize(new Game()))
		return false;

	// Run the Engine
	Int32 r = Flow::Engine::Run();

	// Release the Engine
	Flow::Engine::Uninitialize();

	return r;
}
